<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<meta content="telephone=no" name="format-detection" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
<title>泸州市娱乐业信息管理系统</title>
<link type="text/css" rel="stylesheet" href="../resource/fapiao.css">
<link rel="stylesheet" href="../resource/weuimin.css" />
<link rel="stylesheet" href="../resource/example.css" />
<script type="text/javascript" src="../resource/jweixin1002.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../resource/jweixin1.js"></script>
<script src="../resource/jquery1.js"></script>
<script src="../resource/qrcode.js"></script>
<script src="../resource/jquerybarcode.js"></script>
<script src="../template/js/jquery.js"></script>
<script src="../resource/my.js"></script>
<script src="../script/api.js"></script>

<link rel="stylesheet" href="../resource/jinsuistyle.css" />
<style>
.nav{
	padding: 10px 2%;
}
.bg {
    padding: 15px 0 15px;
}
.weui-grid{width:50%;}
.weui-grid__icon{width: 50px;height: 50px;}
.isnew{background: #FFFFFF url('template/images/xp4.png') no-repeat 100% 0px ;}

            input::-webkit-input-placeholder {
                color: #ccc;
            }
            
           .loginbg {
                width: 100%;
            }
            
            
            .divider {
                height: 0px  
            }
  
   /*         登录条与上面图片的高度（间距）*/
            .user,
            .passwd {

                background: #1fff;

            }
            
            .passwd img,
            .user img {
                vertical-align: top;
            }
            
            .item {
                background-color: #fff;
                border-bottom: 2px solid #e0e0e0;
                position: relative;
                height: 40px;
                font-size: 20px;
            }
            
            .btn {
                margin: 3px 10px;
                background: #2C9CDC;
                height: 40px;
                line-height: 40px;
                text-align: center;
                font-size: 20px;
                margin-top: 20px;
                border-radius: 5px;
                color: #fff;
            }
            
            .user img {
                width: 25px;
                margin-top: 5px;
                margin-left: 50px;
                margin-right: 10px;
            }
            
            .passwd img {   /* 密码中图片框*/
                height: 25px;      /*  高度*/
                margin-top: 5px;   /* 上边距*/
                margin-left: 50px;   /*左边距*/
                margin-right: 10px;  /*右边距*/
            }
            
            .bottom {
                position: absolute;
                left: 0px;
                bottom: 0px;
                width: 100%;
                text-align: center;
                font-size: 12px;
            }
            
            .bottom img {
                height: 50px;
            }
            
            .bottom .arrow {
                text-align: center;
                margin: 10px 0;
            }
            
            .bottom .arrow img {
                width: 40px;
                height: 20px;
            }
            
            #qqpic {
                margin-right: 10px;
                margin-left: 10px;
            }
            
            .thirdinfo {
                color: #666;
                margin-top: 10px;
            }
            
            .thirdcompy .left {
                margin-right: 20px;
            }
            
            .thirdcompy .left,
            .thirdcompy .right {
                width: 40%;
                display: inline-block;
                background: #fff;
                border: 1px solid #e0e0e0;
                border-radius: 4px;
                vertical-align: top;
                text-align: left;
                font-size: 18px;
            }
            
            .thirdcompy .left img,
            .thirdcompy .right img {
                width: 30px;
                height: 30px;
                float: left;
                margin: 5px 10px;
            }
            
            .thirdcompy span {
                line-height: 40px;
                color: #666;
            }
            
            .loginmore {
                margin-top: 10px;
            }
            
            .loginmore span {
                color: #0078ff;
            }
            
            .loginmore .forget {
                margin-left: 10px;
            }
            
            .loginmore .phone {
                margin-right: 10px;
                float: right;
            }
            
            .btnhover {
                background-color: #dcdcdc !important;
            }
            
            .buyhover {
                background-color: rgba(252, 85, 0, 0.6) !important;
            }
            
            .presshover {
                background-color: #FAFAFA !important;
            }
            
            .txthover {
                color: rgba(0, 120, 255, 0.6) !important;
            }
            
            input {
                outline: none;
            }




   .userinfo {
                position: absolute;        /*位置：绝对位置*/
                top: 68px;                
                margin-left: 120px;
            }
            
  .userdwclass {               /* 用户单位样式*/
                font-size: 14px;
                color: #fff;
            }
  .usernameclass {             /* 用户名样式*/
                font-size: 14px;
                color: #fff;
              /*  border: 1px solid #fff;  边框样式*/
                display: inline-block;   /*一行一行排，空格也显示？*/
                padding: 3px;      /*内边距*/
               /* border-radius: 4px;     圆角边框 */
                margin-top: 5px;  /*上外边距*/
            }
 .loginbg {
               width: 100%;
           }
.personal_logo {
    position: absolute;
    top: 35px;
    width: 110px;
    height: 110px;
    left: 20px;
}
.login {
             
                background-repeat: no-repeat;
                background-size: contain;
                position: relative;
            }
              

</style>

<body>
  <header id="statusBar">
	<div id="jsheader_absolute">
			<nav id="jsnav">
					<a id="jsleft" tapmode="">
					</a>
					<div id="jsmiddle">
							<strong id="jstitle">用户密码修改</strong>
					</div>
					<a id="jsright">
					</a>
			</nav>
	</div>
</header>
          <div class="login open-win" win="person_info" login="true">
        <img src="../image/personalbkg.jpg" class="loginbg">
          <img id="userAvatar" src="../image/mimatouxiang.png" class="personal_logo">
          <div class="userinfo">
                <div id="userdw" class="userdwclass">登录场所:</div>
                <div id="username" class="usernameclass">登录用户:</div>
            </div>
        </div>   

            
        <section class="divider"></section>
        <section>
            <div class="item passwd">
                <img src="../image/login02.png">
                <input type="password" placeholder="请输入新密码" id="password1">
            </div>
            <div class="item passwd">
                <img src="../image/login02.png">
                <input type="password" placeholder="请再次输入密码" id="password2">
            </div>
            
             <div class="login open-win" win="person_info" login="true">

            <div class="btn" tapmode onclick="changepassword();">确定修改密码</div>
        </section>

  <script type="text/javascript">

   
    apiready = function (){
         if(api.systemType == "ios"){
			document.getElementById("statusBar").style.background = "#298cb4";
		 }
         $api.fixStatusBar( $api.dom('header') );
		 userdw = $api.byId('userdw');           
		 userdw.innerHTML = '登录场所：' + $api.getStorage('dw_name') ;    //设置登录名
		 username = $api.byId('username');           
		 username.innerHTML ='登录用户：' + $api.getStorage('name') ;    //设置登录名
     }
   
   
        
  function changepassword(){
   
  var password1=$api.byId('password1').value;
  var password2=$api.byId('password2').value;
   

    if(password1==''){
	   api.alert({
	          title: '错误：',
	          msg: '请输入新的密码!'
	      });
	      return;
	    }
		
	 if(password2==''){
	   api.alert({
	          title: '错误：',
	          msg: '请再次输入新的密码!'
	      });
	        return;
	    }
   
	if(password1!=password2){
		   api.alert({
		          title: '错误：',
		          msg: '您两次输入的新密码不一致，请重新输入！'
		      });
		   return;
		   }
		   
    if(password2=='123456'){
		   api.alert({
		          title: '错误提示：',
		          msg: '严禁使用初始密码【123456】来做为新密码！，请重新输入！'
		      });
		   return;
		   }	   
   


    api.ajax({ 
		      url: Serverip + '/base/syuser!doNotNeedSessionAndSecurity_Mobilechangepassword.sy?loginname='+$api.getStorage('loginname')+'&pwds='+password2,
		      method: 'get',
		      cache: false,
		      timeout: 30,
		      dataType: 'json'
		  }, function(ret, err){
		      if(ret.returninfo=='0'){ 
		      
		      		      api.alert({
				          title: '温馨提示：',
				          msg: '修改密码成功，请重新登录'
				                 });
		      
               location.href='../index.html';
               return ;
               }
               else{
               
		                 api.alert({
				          title: '错误提示：',
				          msg: '修改密码失败，请重试'
				                 });
				          return;
                   }
               
        });
    }    
    </script>
		
	<div class="page__ft">
	            <p><a style="color:#777;font-size:12px" onclick="alert(api.deviceId)">泸州市公安局</a></p>
		 		<p><a style="color:#777;font-size:12px;" onclick="alert(api.deviceId)">四川航天金穗高技术有限公司</a><b id="bbb"></b></p>
				</div>

</body>
</html>
